package me.helllp.book.concurrent.ch05;

import java.util.concurrent.Callable;

public class JdkRealData implements Callable<String>{
	private String para;
	
	public JdkRealData(String para) {
		this.para = para;
	}
	
	@Override
	public String call() throws Exception {
		//	模拟一个长时间的操作
		StringBuffer sb = new StringBuffer();
		
		for(int i=0; i<10; i++){
			sb.append(para);
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				// TODO: handle exception
			}
		}
		return sb.toString();
	}
}
